
<template>
    <div class="swiper-container" :id="id">
        <div class="swiper-wrapper">
            <!-- <div class="swiper-slide">
                <img src="" alt="">
                <div></div>
            </div> -->
            <slot></slot>
        </div>
    </div>
</template>


<script>
import "swiper/dist/css/swiper.min.css"
import Swiper from "swiper"  // Swiper 对象 
export default {
  props:{
    id:{
      type:String,
      default:"sid",
    },
    options:{   // 轮播效果 
      type:Object,
      default:{

      }
    }
  },
  data(){
    return {
      mySwiper:null
    }
  },
  mounted(){
    // 轮播图 实例化 
    this.mySwiper = new Swiper("#"+this.id,{
      ...this.options
    })
  }
}
</script>
